import {Router} from 'oh-router'
import {Home} from "@/pages/home/index.jsx";
import {Console} from "@/pages/console/index.jsx";
import {Account} from "@/pages/account/index.jsx";
import {Notfound} from "@/pages/notfound/index.jsx";
import {Helper} from "@/pages/helper/index.jsx";

const router = new Router({
    routes: [
        {
            path: "/",
            element: <Home/>,
            meta: {
                title: "物联网系统大屏首页",
                description: "物联网系统大屏数据展示，设备状态数据统计信息展示",
            },
        }, {
            path: "/account",
            element: <Account/>,
            meta: {
                title: "用户账号登录",
                description: "用户账号注册，账号登录，修改密码等",
            },
        }, {
            path: "/console",
            element: <Console/>,
            children: [
                {
                    path: "/console/project",
                    element: <Home/>,
                    children: [
                        {
                            path: "/console/project/list",
                            element: <Home/>,
                        }, {
                            path: "/console/project/detail",
                            element: <Home/>,
                        }, {
                            path: "/console/project/edit",
                            element: <Home/>,
                        }
                    ]
                }, {
                    path: "/console/collect",
                    element: <Home/>,
                    children: [
                        {
                            path: "/console/collect/list",
                            element: <Home/>,
                        }, {
                            path: "/console/collect/detail",
                            element: <Home/>,
                        }, {
                            path: "/console/collect/edit",
                            element: <Home/>,
                        }
                    ]
                }, {
                    path: "/console/device",
                    element: <Home/>,
                    children: [
                        {
                            path: "/console/device/list",
                            element: <Home/>,
                        }, {
                            path: "/console/device/discover",
                            element: <Home/>,
                        }, {
                            path: "/console/device/edit",
                            element: <Home/>,
                        }, {
                            path: "/console/device/data",
                            element: <Home/>,
                        },
                    ]
                }, {
                    path: "/console/log",
                    element: <Home/>,
                    children: [
                        {
                            path: "/console/log/list",
                            element: <Home/>,
                        }, {
                            path: "/console/log/detail",
                            element: <Home/>,
                        }
                    ]
                }, {
                    path: "/console/data",
                    element: <Home/>,
                    children: [
                        {
                            path: "/console/data/list",
                            element: <Home/>,
                        }, {
                            path: "/console/data/detail",
                            element: <Home/>,
                        }
                    ]
                }, {
                    path: "/console/system",
                    element: <Home/>,
                    children: [
                        {
                            path: "/console/system/list",
                            element: <Home/>,
                        }, {
                            path: "/console/system/detail",
                            element: <Home/>,
                        }
                    ]
                },
            ],
        }, {
            path: "/helper",
            element: <Helper/>,
            meta: {
                title: "帮助中心",
                description: "帮助中心，文档，手册等",
            },
        }, {
            path: "*",
            element: <Notfound/>,
            meta: {
                title: "404 Not Found",
                description: "页面未找到，请检查地址是否正确",
            },
        },
    ],
})
export default router